CC = gcc
CFLAGS = -Wall -ansi
OBJETOS = srvnet.o srvnet-proc.o Genericas.o
OBJETOS_C =cache.o cache-proc.o Genericas.o
OBJETOS_U =upload.o upload-proc.o

srvnet: $(OBJETOS)
	$(CC) $(CFLAGS) -o $@ $^

cache: $(OBJETOS_C)
	$(CC) $(CFLAGS) -o $@ $^

upload: $(OBJETOS_U)
	$(CC) $(CFLAGS) -o $@ $^

cache.o: cache.c cache.h
	$(CC) $(CFLAGS) -c $<

cache-proc.o: cache-proc.c cache-proc.h
	$(CC) $(CFLAGS) -c $<

srvnet.o: srvnet.c srvnet.h
	$(CC) $(CFLAGS) -c $<

srvnet-proc.o: srvnet-proc.c srvnet-proc.h
	$(CC) $(CFLAGS) -c $<

upload.o: upload.c upload.h
	$(CC) $(CFLAGS) -c $<

upload-proc.o: upload-proc.c upload-proc.h
	$(CC) $(CFLAGS) -c $<

Genericas.o: Genericas.c Genericas.h
	$(CC) $(CFLAGS) -c $<

cleanlog: 
	rm -f *.log
clean:
	rm -f *.o srvnet cache upload
